package ru.yermak.bookkeeping.operations;

import ru.yermak.bookkeeping.model.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.Propagation;

/**
 * User: harrier
 * Date: Apr 13, 2009
 */

@Repository
public class HibernateOperationDao implements OperationDao {

    @Autowired
    private HibernateTemplate hibernateTemplate;


    @Override
    public Integer insertOperation(Operation operation) {
        return (Integer) hibernateTemplate.save(operation);
    }
}
